package com.imgrate.migration.repository;

import com.imgrate.migration.entity.BackupTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository
public interface BackupTaskRepository extends JpaRepository<BackupTask, Long> {
    List<BackupTask> findByStatus(String status);
    
    List<BackupTask> findByStatusAndNextRunTimeLessThanEqual(String status, java.time.LocalDateTime nextRunTime);
    
    List<BackupTask> findAllByOrderByCreatedAtDesc();
}